package com.changlu.Aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @ClassName ProxyAspect
 * @Author ChangLu
 * @Date 2021/8/24 23:13
 * @Description TODO
 */
@Aspect
@Component
public class ProxyAspect {

    @Pointcut("execution(* com.changlu.service.OrderService.*(..))")//设置切入点，方便下面直接调用
    public void point(){}

    //前置通知
    @Before("point()")
    public void before(JoinPoint joinPoint){
        System.out.println(2+"==>@Before");
    }
}